﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8"/>
     <title>节点-事件</title>
    <link href="../../Comm/Style/CommStyle.css" rel="stylesheet" type="text/css" />
    <link href="../../Comm/Style/Table0.css" rel="stylesheet" type="text/css" />
    <link href="../../Scripts/easyUI/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <link href="../../Scripts/easyUI/themes/icon.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/easyUI/jquery-1.8.0.min.js" type="text/javascript"></script>
    <script src="../../Scripts/easyUI/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="../../Scripts/QueryString.js" type="text/javascript"></script>

     <script language="JavaScript" src="../../Comm/JScript.js" type="text/javascript" ></script>
    <script type="text/javascript" src="../../Scripts/bootstrap/js/jquery.min.js"></script>
    <script src="../../Scripts/QueryString.js" type="text/javascript"></script>
    <link href="../../../DataUser/Style/ccbpm.css" rel="stylesheet"  type="text/css" />

    <!-- 引用通用的js文件. -->
    <script type="text/javascript" src="../../Scripts/config.js"></script>
    <script type="text/javascript" src="../../Comm/Gener.js"></script>
     

    <script type="text/javascript">
        //页面启动函数.
        $(function () {

            $("#Msg").html("正在加载,请稍后......");

            //初始化groupID.
            var nodeID = GetQueryString("FK_Node");
            var flowNo = GetQueryString("FK_Flow");
            var frmID = GetQueryString("FK_MapData");
            var event = GetQueryString("Event");
            var eventSort = "Node";

            $.ajax({
                type: 'post',
                async: true,
                url: Handler + "?DoType=Action_Init&FK_Node=" + nodeID + "&FK_Flow=" + flowNo + "&FK_MapData=" + frmID + "&EventSort=" + eventSort + "&m=" + Math.random(),
                dataType: 'html',
                success: function (data) {

                    if (data.indexOf('err@') == 0) {
                        alert(data);
                        return;
                    }

                    //  alert(data);

                    data = JSON.parse(data);

                    //                    //事件实体类对应. Sys_FrmEvent 表.
                    //                    var frmEvents = data["FrmEvents"];

                    //事件类型.
                    var eventLists = data["EventLists"];

                    var html = "<div title='sss' style='padding:10px; overflow:auto' data-options=''>";

                    html += "<ul class='navlist' >";
                    for (i = 0; i < eventLists.length; i++) {

                        var eventList = eventLists[i];
                        var msg = "";
                        if (eventList.IsHaveMsg == 1)
                            msg = "<img src='/WF/Img/Msg.png' />";
                        //   alert(JSON.stringify(eventList));
                        if (event == eventList.No)
                            html += "<li title='" + (eventList.Note || "") + "'><a target='_self' href='Action.htm?FK_Node=" + nodeID + "&FK_Flow=" + flowNo + "&Event=" + eventList.No + "' ><b>" + eventList.CH + msg + "</b></a></li>";
                        else
                            html += "<li title='" + (eventList.Note || "") + "'><a target='_self' href='Action.htm?FK_Node=" + nodeID + "&FK_Flow=" + flowNo + "&Event=" + eventList.No + "' >" + eventList.CH + msg + "</a></li>";
                    }
                    html += "</ul>";
                    html += "</div>";

                    var div = document.getElementById("left");
                    div.innerHTML = html;

                    //显示内容.
                    ShowDoc();
                }
            });
        });

        function ShowDoc() {

            var url = "";
            var fk_event = GetQueryString("Event");

            if (fk_event == "null"
             || fk_event == ""
              || fk_event == null) {
                url = "ActionHelp.htm";
            } else {
                url = "ActionDtl.htm?FK_MapData=" + GetQueryString("FK_MapData") + "&FK_Node=" + GetQueryString("FK_Node") + "&FK_Event=" + fk_event;
            }

            var frm = document.getElementById("myFrm");
            frm.src = url;

            //  "ActionDtl.htm?FK_MapData=" + GetQueryString("FK_MapData") + "&FK_Node=" + GetQueryString("FK_Node") + "&FK_Event=" + fk_event;
        }

    </script>
</head>
<body class="easyui-layout" >
	<form id="cc">
	  <div data-options="region:'center',title:'节点事件',border:false">

			<div class="easyui-layout" data-options="fit:true">
				<div data-options="region:'east',noheader:true" style="width: 200px;">
					<div id="left"></div> 
				</div>
				<div data-options="region:'center',noheader:true">
					<iframe style="width:99%; height:99%;" id="myFrm" name="myFrm" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes"></iframe>
				</div>
			</div>
		</div>
	</form>
</body>
</html>
